An End-to-End Delivery Management System

Sirui Wang(sw2232) and Yuchen Cai(yc2563)
ECE5725 Final Project
Fall 2019

Generic placeholder image

Introduction

In modern days, the shipment and delivery service industry has grown up rapidly. The number of sales, especially online, is amazing and still increasing every year. But sometimes, the delivery courier meets trouble to carry packages in some rural areas and needs a portable device that can both check and manage the order lists. This project aims to provide a delivery management system for both the customers and couriers in which the customers place their delivery orders and the couriers use a raspberry pi to check and manage the current orders as well as interact with the incoming user orders in real-time. The high-level idea is to design a web application for the user so that they can place their orders together with the details and wait for the courier to collect their items. The server is hosted on a Raspberry Pi solely and runs in parallel with the user interface program, which allows the courier to manage orders. Finally, we have implemented a fully functional multiprocessing delivery system with a portable, flexible and efficient service. A general system design diagram is given in Figure.1.


Keywords: Raspberry Pi, Django, PostgreSQL, TCP, Wsgi, Nginx, html, css, javascript, Ajax, Apache Jmeter, Pygame

Generic placeholder image

Figure.1


Project Objective:

  • Build an interactive website(runs on a laptop or mobile devices) for the user to place a delivery order and wait for a response from the courier showing whether the order is accepted or declined.
  • Implement a backend of the system that handles users’ requests and saves them to a database that runs in the background.
  • Design a User-interface for the courier to manage orders, which runs in the foreground, in real-time when connected to WiFi using a raspberry pi 3B model and a piTFT as the display.

Design and Testing


Results

Generally, we did better than expected and added many features to the system. In the first two weeks, we worked on the front-end and configured some basic settings on Django. In the third week, we finished the interfaces between front-end and Django and postgresql. In the last two weeks, we finished the courier UI pages as well as the communication. We also added features like geolocation-based sorting in the end. A video of our project is shown below.


Conclusion

At the end of this project, our team successfully built an end-to-end delivery management system on Raspberry Pi as well as a user-interface on piTFT. Any user can place a delivery order and get a response from the web application. The courier can manage orders saved in DB on piTFT screen and respond to new orders accordingly. This server is portable and can be carried with easily. Whenever it is powered, the server will be working. We also applied a load test in the end and found that the Raspberry has the maximum throughput of 37.6 qps when there are 300 threads.


Future Work

If time permits, some new features could be added into this delivery management system. First of all, it is possible to create an authentication system where the user can sign in to their own accounts on the website, and see the current status of their historical orders. Secondly, as shown in the Results section, the maximum throughput of the website is around 300 threads(users). Therefore the bottleneck of the system is the number of couriers, since each order has to be processed by the number of courier. We might think about the way to scale up the system and improve its capacity to handle more user requests.


Budget

Raspberry Pi 3 $35

piTFT screen $35

SD card $5.8

Case $4

Total $79.8


References

[1]Wijesinghe, M. (2019). What happens when you type an URL in the browser and press enter?. [online] Medium. Available at: https://medium.com/@maneesha.wijesinghe1/what-happens-when-you-type-an-url-in-the-browser-and-press-enter-bb0aa2449c1a [Accessed 12 Dec. 2019].

[2]Docs.djangoproject.com. (2019). Templates | Django documentation | Django. [online] Available at: https://docs.djangoproject.com/en/2.2/topics/templates/ [Accessed 12 Dec. 2019].

[3]Docs.djangoproject.com. (2019). Managing static files (e.g. images, JavaScript, CSS) | Django documentation | Django. [online] Available at: https://docs.djangoproject.com/en/3.0/howto/static-files/ [Accessed 12 Dec. 2019].

[4]Google Fonts. (2019). Google Fonts. [online] Available at: https://fonts.google.com/specimen/Tangerine [Accessed 12 Dec. 2019].

[5]Youtube.com. (2019). YouTube. [online] Available at: https://www.youtube.com/watch?v=Axh8rNKgvmk&list=PLzXscUBmhxmpv6k3WMp7A0sYoZsSG_FB1&index=2 [Accessed 12 Dec. 2019].

[6]Youtube.com. (2019). YouTube. [online] Available at: https://www.youtube.com/watch?v=_qUpvRTqK0Y [Accessed 12 Dec. 2019].

The image for the background is credited to this source


The codes of our project can be found in here


Members

Generic placeholder image

Yuchen Cai

yc2563@cornell.edu

Designed the outlook of website and implemented piTFT drawing programs.Built the website using HTML, CSS, and JavaScript.Worked on the usage of Django.Test the overall performance of the system.

Generic placeholder image

Sirui Wang

sw2232@cornell.edu

Work on html, css, javascript of the website. Implemented the backend services with Django, postgresql database. Implemented user interface for courier. Tested the overall performance of the system.